import {AddRouteRecordRaw} from '../index'
import Layout from '@/views/main.vue'

export default [
    {
        path: '/',
        component: Layout,
        name: 'main',
        meta: {
            title: '首页'
        },
        redirect: {path: '/index'},
        children: [
            {
                path: 'index',
                name: 'index',
                meta: {
                    title: '小程序后台管理'
                },
                component: () => import('@/views/pages/user/uni-app.vue')
            }
        ]
    },
    {
        path: '/lib',
        component: Layout,
        name: 'lib',
        meta: {
            title: '图书管理'
        },
        redirect: {path: '/lib/area'},
        children: [
            {
                path: 'area',
                name: 'area',
                meta: {
                    title: '区域管理'
                },
                component: () => import('@/views/pages/area/index.vue')
            },
            {
                path: 'time',
                name: 'time',
                meta: {
                    title: '预约时间段管理'
                },
                component: () => import('@/views/pages/time/index.vue')
            },
            {
                path: 'record',
                name: 'record',
                meta: {
                    title: '预约记录段管理'
                },
                component: () => import('@/views/pages/record/index.vue')
            },
        ]
    }
] as AddRouteRecordRaw[]